﻿using DocumentFormat.OpenXml.Lite.DrawingML.Geometry.Properties;
using DocumentFormat.OpenXml.Lite.DrawingML.Types;
using DocumentFormat.OpenXml.Lite.Shared;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Chart.Elements
{
    [XmlRoot("ser", Namespace = Constants.Chart)]
    public class BarSeries : XmlSerializable
    {
        [XmlElement("idx", Namespace = Constants.Chart)]
        public RequiredValue<uint> Index { get; set; }

        [Optional]
        [XmlElement("order", Namespace = Constants.Chart)]
        public RequiredValue<uint> Order { get; set; }

        [Optional]
        [XmlElement("tx", Namespace = Constants.Chart)]
        public Text Text { get; set; }

        [Optional]
        [XmlElement("spPr", Namespace = Constants.Chart)]
        public ShapeProperties ShapeProperties { get; set; }

        [Optional]
        [XmlElement("invertIfNegative", Namespace = Constants.Chart)]
        public NullableValue<bool> InvertIfNegative { get; set; }

        [Optional]
        [XmlElement("pictureOptions", Namespace = Constants.Chart)]
        public PictureOptions PictureOptions { get; set; }

        [Optional]
        [XmlElement("dPt", Namespace = Constants.Chart)]
        public DataPoint DataPoint { get; set; }

        [Optional]
        [XmlElement("dLbls", Namespace = Constants.Chart)]
        public DataLabels DataLabels { get; set; }

        [Optional]
        [XmlElement("trendline", Namespace = Constants.Chart)]
        public Trendline Trendline { get; set; }

        [Optional]
        [XmlElement("errBars", Namespace = Constants.Chart)]
        public ErrorBars ErrorBars { get; set; }

        [Optional]
        [XmlElement("cat", Namespace = Constants.Chart)]
        public Category CategoryAxisData { get; set; }

        [Optional]
        [XmlElement("val", Namespace = Constants.Chart)]
        public Value Value { get; set; }

        [Optional]
        [XmlElement("shape", Namespace = Constants.Chart)]
        public NullableValue<ST_Shape> Shape { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.Chart)]
        public ExtensionList ExtensionList { get; set; }

        public BarSeries() { }
    }
}
